import Vue from 'vue'
import VueRouter from 'vue-router'
import HomeView from '../views/index/HomeView.vue'
import AboutView from '../views/detail/AboutView.vue'
import CourseView from '../views/index/components/CourseView.vue'
import SearchView from '../views/search/SearchView.vue'
import LoginView from '../components/LoginView.vue'
import CartView from '../views/cart/CartView.vue'
import localView from '../views/local/localView.vue'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'home',
    component: HomeView
  },
  {
    path: '/AboutView',
    name: 'AboutView',
    component: AboutView
  },
  {
    path: '/CourseView',
    name: 'CourseView',
    component: CourseView
},
{
  path: '/SearchView',
  name: 'SearchView',
  component: SearchView
},
{
  path: '/LoginView',
  name: 'LoginView',
  component: LoginView
},
{
  path: '/CartView',
  name: 'CartView',
  component: CartView
},
{
  path: '/localView',
  name: 'localView',
  component: localView
}
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
